{% extends "base_self.html" %}


{%block title%}{{label}}列表页{%endblock%}
{%block script%}{{super()}}{%endblock%}
{%block banner%}{%endblock%}
{% block main %}



<h2>{{label}}-最新发布</h2>

{%for item in pagination.items%}
<article class="latestpost">
  <div class="articalpic">
    <img class="recent-artical" src="./static/img/tiance.jpg" alt="文章推荐">
  </div>
  <div class="articalcontent">
    <a href="#" class='articaltitle'>{{item[3]}}</a>
    <p class='publishtime'>{{item[1]}}</p>

    <p class="articalrecommedate">{{item[2]}}<a href="#">前往查看</a></p>
  </div>
</article>
{%endfor%}

<ul class='pagination'>
{%if pagination.has_prev%}
  <li><a href="{{url_for('labellist',page=pagination.page-1,label =label)}}"><</a></li>
{%else%}
  <li class='disabled'><a><</a></li>
{%endif%}

{%for page in pagination.iter_pages(1,1,2,1)%}
{%if page%}
  {%if page == pagination.page %}
  <li class= 'active'><a href="{{url_for('labellist',page=page,label=label)}}">{{page}}</a></li>
  {%else%}
  <li><a href="{{url_for('labellist',page=page,label=label)}}">{{page}}</a></li>
  {%endif%}
{%else%}
  <li class='disabled'><a href="#">&hellip;</a></li>
{%endif%}
{%endfor%}

{%if pagination.has_next%}
  <li><a href="{{url_for('labellist',page=pagination.page+1,label=label)}}">></a></li>
{%else%}
  <li class='disabled'><a>></a></li>
{%endif%}
</ul>

{%endblock%}
